package bjut;

import bjut.zrpc.core.optimization.annotation.ZRpcScan;
import bjut.zrpc.core.optimization.netty.NettyServer;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Hello world!
 */
@ZRpcScan(basePackage = "bjut.server")
public class ZRpcServer {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ZRpcServer.class);
        //ZRpcNettyServer nettyServer = applicationContext.getBean(ZRpcNettyServer.class);
        NettyServer nettyServer = applicationContext.getBean(NettyServer.class);
//        HelloWordService hellWordService = new HellWordServiceImpl();
//        ProviderConfig providerConfig = ProviderConfig.builder().group("zhuzhiming").version("version01").service(hellWordService).build();
//        zRpcNettyServer.registerService(providerConfig);
      //  nettyServer.start();

    }
}
